/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao;

import java.util.List;
import pojo.ObjType;

/**
 *
 * @author 4pril
 */
public class ObjectTypeDAO extends MyQuery{
    public static ObjType getObjectTypeByName(String obj_name){
        String hql = "from ObjType where objType.objName = '" + obj_name + "'";             
        return (ObjType) getList(hql).get(0);
    }
    
    public static List<ObjType> getListPost(String hql){
        return (List<ObjType>) (List<?>) getList(hql);
    }

    @Override
    protected Class getPOJOClass() {
        return this.getClass();
    }
}
